Refactor command line argument parsing with gflags#4676
Refactor command line argument parsing with gflags#4676raulchen merged 11 commits intoray-project:masterfrom
Conversation
6f186f9 to
1a82e84
Compare
|
Test PASSed. |
|
Test PASSed. |
|
Test FAILed. |
|
Nice, this is much cleaner. Shall we use |
|
@robertnishihara The purpose of this PR is to implement this with minimizing dependencies. |
6cc00e6 to
c7de75d
Compare
Refine Enable in worker runner. Fix Fix sh scripts/format.sh Add doc comment. Fix lint
c7de75d to
ccf6728
Compare
|
Test PASSed. |
|
Test PASSed. |
|
Test PASSed. |
|
Test PASSed. |
|
Test FAILed. |
|
Test FAILed. |
python/ray/services.py
Outdated
| "-static_resource_list={}".format(resource_argument), | ||
| "-config_list={}".format(config_str), | ||
| "-python_worker_command={}".format(start_worker_command), | ||
| "-java_worker_command={}".format(java_worker_command), |
There was a problem hiding this comment.
worker command contains spaces, will this be an issue?
There was a problem hiding this comment.
note that we can pass "-java_worker_command" and java_worker_command as 2 separate args, then we don't need to worry about spaces.
There was a problem hiding this comment.
It works fine. The value of java_worker_command can be passed into raylet smoothly in this way.(The reason is similar to the 2 separated args you mentioned.)
| buildPythonWorkerCommand(), // python worker command | ||
| buildWorkerCommandRaylet(), // java worker command | ||
| redisPasswordOption | ||
| String.format("-raylet_socket_name=%s", rayConfig.rayletSocketName), |
There was a problem hiding this comment.
I think the convention is to use double dashes for full names (--raylet_socket_name). why does gflag use single dash? Does gflag also support double?
There was a problem hiding this comment.
gflags supports double dashes too.
src/ray/raylet/main.cc
Outdated
| DEFINE_bool(disable_stats, false, "Whether disable the stats."); | ||
| DEFINE_string(stat_address, "127.0.0.1:8888", "The address that we report metrics to."); | ||
| DEFINE_bool(disable_stdout_exporter, true, | ||
| "Whether disable the stdout exporter for stats."); |
There was a problem hiding this comment.
maybe change this to enable_stdout_exporter with default value false. Then we can just use --enable_std_exporter, instead of --disable_stdout_exporter=false.
|
Test FAILed. |
|
Test PASSed. |
|
Test PASSed. |
|
Test FAILed. |
|
Test FAILed. |
|
Using |
|
I think gflags is good to use, it is already linked in because of gtest as far as I know. |
|
Thanks @pcmoritz and @robertnishihara . I have already switched to gflags. |
|
Test PASSed. |
|
Test PASSed. |
BUILD.bazel
Outdated
| exclude = [ | ||
| "src/ray/util/logging_test.cc", | ||
| "src/ray/util/signal_test.cc", | ||
| "src/ray/util/util_test.cc", |
There was a problem hiding this comment.
This no longer exists, right?
|
Test PASSed. |
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
What do these changes do?
Integrate
gflagsand refine the command line arguments parsing. This can make us more easily to add a option to raylet.Related Issue
This can close #2280.
scripts/format.shto lint the changes in this PR.